#encoding=utf-8
from django.contrib import admin
# from .models import Question,  Choice
from .models import *
# Register your models here.

# class ChoiceInline(admin.TabularInline):
#     model = Choice
#     extra = 3


# class QuestionAdmin(admin.ModelAdmin):
#     fieldsets = [
#         (None,               {'fields': ['question_text']}),
#         ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
#     ]
#     inlines = [ChoiceInline]
#     list_display = ('question_text', 'pub_date', 'was_published_recently')
#     list_filter = ['pub_date']
# admin.site.register(Question, QuestionAdmin)
class UserAdmin(admin.ModelAdmin):
	"""User模型"""
	list_display = ('user_alias', 'email', 'registration_time')
	list_filter  = ['registration_time']
class Relation_shipAdmin(admin.ModelAdmin):
	"""Relation_ship_admin"""
	list_display = ('fleet_name_id', 'ship_id', 'user_id')
class Engine_dataAdmin(admin.ModelAdmin):
	"""Engine_data_admin"""
	list_display = ('receive_data_id', 'monitor_id', 'generation_data_time', 'receive_data_time', 'speed')
class ManagementAdmin(admin.ModelAdmin):
	"""Management_admin"""
	list_display = ('id', 'company', 'phone' , 'email' , 'fax', 'contacts')

admin.site.register(Engine)
admin.site.register(Engine_fault_record)
admin.site.register(Engine_data, Engine_dataAdmin)
admin.site.register(Switch)
admin.site.register(Reengine_data)
admin.site.register(NewUser)
admin.site.register(User_type)
admin.site.register(Relation_ship, Relation_shipAdmin)
admin.site.register(Phone_card)
admin.site.register(Monitor)
admin.site.register(Monitor_par)
admin.site.register(Management, ManagementAdmin)
admin.site.register(Voyage_number)
admin.site.register(Ship)
admin.site.register(Ship_owner)
admin.site.register(Ship_group)
admin.site.register(Ship_data)
admin.site.register(Ship_type)
admin.site.register(Terminal)
admin.site.register(Propeller)
admin.site.register(Protocol)
admin.site.register(Boiler)
admin.site.register(Gear)
admin.site.register(Gear_data)
